<div id="decView"></div>
<div class="layui-card-header"><span class="def-fc left-split"><i class="fa fa-address-card-o"></i>主单信息</span></div>
<div class="layui-card-body">
    <div id="purchaseContractView"></div>
</div>

<!--合同明细-->
<div class="layui-card-header"><span class="def-fc left-split"><i class="fa fa-list"></i>合同明细</span></div>
<div class="layui-card-body">
    <table class="layui-hide" id="member-list" lay-filter="member-list"></table>
</div>

<!--费用明细-->
<div class="layui-card-header"><span class="def-fc left-split"><i class="fa fa-list"></i>费用明细</span></div>
<div class="layui-card-body">
    <table class="layui-hide" id="cost-list" lay-filter="cost-list"></table>
</div>

<script type="text/html" id="purchaseContractViewTemp">
    <div class="layui-row">
        <div class="layui-col-md3"><label class="fkey">合同号：</label><label class="fval">{{d.docNo}}</label></div>
        <div class="layui-col-md3"><label class="fkey">订单编号：</label><label class="fval">{{d.orderNo}}</label></div>
        <div class="layui-col-md3"><label class="fkey">签订日期：</label><label class="fval">{{removeNull(d.signingDate)}}</label></div>
        <div class="layui-col-md3"><label class="fkey">签订地点：</label><label class="fval">{{removeNull(d.signingPlace)}}</label></div>
    </div>
    <div class="layui-row">
        <div class="layui-col-md3"><label class="fkey">客户：</label><label class="fval">{{removeNull(d.customerName)}}</label></div>
        <div class="layui-col-md3">
            <div class="layui-col-md6"><label class="fkey">开票日期：</label><label class="fval">{{removeNull(d.invoicingDate)}}</label></div>
            <div class="layui-col-md6"><label class="fkey">收票日期：</label><label class="fval">{{removeNull(d.invoiceDate)}}</label></div>
        </div>
        <div class="layui-col-md3"><label class="fkey">收票金额：</label><label class="fval">{{formatCurrency(d.invoiceVal)}}</label></div>
        <div class="layui-col-md3"><label class="fkey">发票号码：</label><label class="fval">{{removeNull(d.invoiceNo)}}</label></div>
    </div>
    <div class="layui-row">
        <div class="layui-col-md3"><label class="fkey">买方：</label><label class="fval">{{removeNull(d.buyerName)}}</label></div>
        <div class="layui-col-md3"><label class="fkey">签约代表：</label><label class="fval">{{removeNull(d.buyerDeputy)}}</label></div>
        <div class="layui-col-md6"><label class="fkey">买方电话：</label><label class="fval">{{removeNull(d.buyerTel)}}</label></div>
    </div>
    <div class="layui-row">
        <div class="layui-col-md3"><label class="fkey">买方银行：</label><label class="fval">{{removeNull(d.buyerBank)}}</label></div>
        <div class="layui-col-md3"><label class="fkey">银行账号：</label><label class="fval">{{removeNull(d.buyerBankNo)}}</label></div>
        <div class="layui-col-md6"><label class="fkey">银行地址：</label><label class="fval">{{removeNull(d.buyerBankAddress)}}</label></div>
    </div>
    <div class="layui-row">
        <div class="layui-col-md3"><label class="fkey">卖方：</label><label class="fval">{{removeNull(d.sellerName)}}</label></div>
        <div class="layui-col-md3"><label class="fkey">签约代表：</label><label class="fval">{{removeNull(d.sellerDeputy)}}</label></div>
        <div class="layui-col-md6"><label class="fkey">卖方电话：</label><label class="fval">{{removeNull(d.sellerTel)}}</label></div>
    </div>
    <div class="layui-row">
        <div class="layui-col-md3"><label class="fkey">卖方银行：</label><label class="fval">{{removeNull(d.sellerBank)}}</label></div>
        <div class="layui-col-md3"><label class="fkey">银行账号：</label><label class="fval">{{removeNull(d.sellerBankNo)}}</label></div>
        <div class="layui-col-md6"><label class="fkey">银行地址：</label><label class="fval">{{removeNull(d.sellerBankAddress)}}</label></div>
    </div>
    <div class="layui-row">
        <div class="layui-col-md3"><label class="fkey">合同金额：</label><label class="fval">{{formatCurrency(d.totalPrice)}}</label></div>
        <div class="layui-col-md3"><label class="fkey">票差调整金额：</label><label class="fval">{{formatCurrency(d.differenceVal)}}</label></div>
        <div class="layui-col-md3"><label class="fkey">代理费：</label><label class="fval">{{formatCurrency(d.agentFee)}}</label></div>
        <div class="layui-col-md3"><label class="fkey">代垫费：</label><label class="fval">{{formatCurrency(d.matFee)}}</label></div>
    </div>
    <div class="layui-row">
        <div class="layui-col-md6"><label class="fkey">结汇说明：</label><label class="fval">{{d.settleAccountInfo}}</label></div>
        <div class="layui-col-md6"><label class="fkey">汇率：</label><label class="fval">{{removeNull(d.exchangeRate)}}</label></div>
    </div>
    <div class="layui-row">
        <div class="layui-col-md12"><label class="fkey">备注：</label><label class="fval">{{removeNull(d.memo)}}</label></div>
    </div>

    <div class="layui-row">
        <div class="layui-col-md3"><label class="fkey">是否函调：</label><label class="fval">{{d.isCorrespondence?'是':'否'}}</label></div>
        <div class="layui-col-md3"><label class="fkey">是否回函：</label><label class="fval">{{removeNull(d.replyStatus)}}</label></div>
        <div class="layui-col-md3"><label class="fkey">回函日期：</label><label class="fval">{{removeNull(d.replyDate)}}</label></div>
    </div>

    <div class="layui-row">
        <div class="layui-col-md3"><label class="fkey">退税申报日期：</label><label class="fval">{{removeNull(d.taxDeclareTime)}}</label></div>
        <div class="layui-col-md3"><label class="fkey">退税申报金额：</label><label class="fval">{{formatCurrency(d.taxDeclareAmount)}}</label></div>
        <div class="layui-col-md3"><label class="fkey">税局退税日期：</label><label class="fval">{{removeNull(d.taxRefundTime)}}</label></div>
        <div class="layui-col-md3"><label class="fkey">税局退税金额：</label><label class="fval">{{formatCurrency(d.taxRefundAmount)}}</label></div>

    </div>
    <div class="layui-row">
        <div class="layui-col-md12"><label class="fkey">税局退税备注：</label><label class="fval">{{removeNull(d.taxRefundRemark)}}</label></div>
    </div>
</script>